<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
    String path = request.getContextPath() + "/";
%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title>管理中心</title>
    <link rel="stylesheet" href="css/pintuer.css">
    <link rel="stylesheet" href="css/admin.css">
    <script src="js/jquery.js"></script>
</head>
<body style="background-color:#f2f9fd;">
<div class="header bg-main">
    <div class="logo margin-big-left fadein-top">
        <h1><img src="images/y.jpg" class="radius-circle rotate-hover" height="50" alt="" id="${name}"/>你好：${name}</h1>
    </div>
    <div class="head-l">
        <a href="##" class="button button-little bg-blue"><span class="icon-wrench"></span>登录${timer}次</a> &nbsp;&nbsp;
        <a class="button button-little bg-red" href="index.jsp" id="reindex"><span class="icon-power-off"></span>退出登录</a>
    </div>
    <div id="nowTime" class="button button-little bg-blue" style="float: right"></div>
</div>
<div class="leftnav">
    <div class="leftnav-title"><strong><span class="icon-list"></span>菜单列表</strong></div>
    <h2><span class="icon-user"></span>系统管理</h2>
    <ul style="display:block">
        <c:forEach items="${dutyList}" var="duty">
            <li><a href="${duty.url}" target="right"><span class="icon-caret-right"></span>${duty.duty_name}</a></li>
        </c:forEach>
    </ul>
</div>
<input type="hidden" id="t" value="${addr}"><a href="" id="redirect"  target="_top"><span id="go"></span></a>
<script src="<%=path%>js/jquery.js" charset="utf-8"></script>
<script src="<%=path%>js/jquerysession.js" charset="utf-8"></script>
<script type="text/javascript">
    $(function(){
        $(".leftnav h2").click(function(){
            $(this).next().slideToggle(200);
            $(this).toggleClass("on");
        })
        $(".leftnav ul li a").click(function(){
            $("#a_leader_txt").text($(this).text());
            $(".leftnav ul li a").removeClass("on");
            $(this).addClass("on");
        })
    });
    if($("#t").val()!=''){
        $("#redirect").attr("href",$("#t").val());
        $("#go").trigger("click");
    }
    //退出时提交请求清除当前用户session
    $("#reindex").click(function () {
        $.ajax({
            type: "post",
            url: "exit.do",
            success: function() {
            },
        });
    })
    setInterval(function(){ current() },1000);
    function current(){
        var d=new Date(),str='';
        str +=d.getFullYear()+'年'; //获取当前年份
        str +=d.getMonth()+1+'月'; //获取当前月份（0——11）
        str +=d.getDate()+'日';
        str +=d.getHours()+'时';
        str +=d.getMinutes()+'分';
        str +=d.getSeconds()+'秒';//innerHTML设置或获取标签所包含的HTML+文本信息(从标签起始位置到终止位置全部内容，包括HTML标签，但不包括自身)
        document.getElementById("nowTime").innerHTML=str;
        }
</script>
<ul class="bread">
    <li><a href="test.jsp" target="right" class="icon-home"> 首页</a></li>
    <li><a href="##" id="a_leader_txt">网站信息</a></li>
    <li><b>当前语言：</b><span style="color:red;">中文</span>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;切换语言：<a href="##">中文</a> &nbsp;&nbsp;<a href="##">英文</a> </li>
</ul>
<div class="admin">
    <iframe scrolling="auto" rameborder="0" src="test.jsp" name="right" width="100%" height="100%"></iframe>
</div>
</body>

</html>